import { Link, useNavigate } from "react-router-dom"


const Login = () => {

    const navigate = useNavigate()
    return (
        <div>
            <div>Login 002</div>
            <br />
            声明式导航：<Link to='/article'>声明式导航： to='/article'</Link>
            <br />
            编程式导航：<button onClick={() => navigate("/article")}>  navigate("/article") </button>
            编程式导航：<button onClick={() => navigate("/article?id=100&name=diz")}> useSearchParams 传参navigate("/article") </button>
            编程式导航：<button onClick={() => navigate("/article/1001")}> Params 传参navigate("/article") </button>
        </div>
    )
}

export default Login